{% extends "base.html" %}

{% import 'includes/forms.html' as forms %}

{% block content %}
<div class="page-header"><h1>Edit order</h1></div>
<div class="row">

</div>
<div class="row">
<form method="POST" action="{{ action }}" enctype="multipart/form-data">
{{ forms.form_fields(form) }}
<table class="table striped">
<thead><tr><th>Payments</th><th>Timestamp</th><th>Amount</th><th>Status</th></tr></thead>
{% for p in order.payments %}
<tr><td>{{ p.description }}</td><td>{{ p.timestamp }}</td><td>{{ p.amount }}</td><td>{{ p.status }}</td></tr>
{% endfor %}
</table>


{{ forms.action_buttons('Update') }}
</form>
</div>
<p>total no items: {{ order.items.count() }}</p>
{% endblock %}